/**
 * 通用css样式布局处理
 * Copyright (c) 2020 bawfkjit
 */

svg:not(:root) {
  fill: currentColor;
}
// 图片预览
.el-image-viewer__wrapper {
  top: 100px;
  right: 20%;
  bottom: 100px;
  left: 20%;
  z-index: 2999 !important;
}
.el-image-viewer__canvas {
  overflow: hidden;
}

/** 表单布局 **/
.form-header {
  font-size: 15px;
  color: #6379bb;
  border-bottom: 1px solid #ddd;
  margin: 8px 10px 25px 10px;
  padding-bottom: 5px;
}

.el-table {
  .el-table__body-wrapper {
    .el-button [class*='el-icon-'] + span {
      margin-left: 1px;
    }
  }
}
.text-link {
  color: #178bff;
  cursor: pointer;
}
.Special-text {
  color: #00a442;
}

/** 表格分页 **/
.pagination-container {
  position: relative;
  height: 25px;
  margin-bottom: 10px;
  margin-top: 5px;
  padding: 5px 20px !important;
  .el-pagination {
    right: 0;
    position: absolute;
  }
}

// 收缩布局
.flex-main {
  height: 100%;
  display: flex;
  .flex-left {
    flex-shrink: 0;
    height: calc(100% + 20px);
    // height: 100%;
    transform: translateX(-10px) translateY(-10px);
  }
  .flex-right {
    flex: 1;
    padding: 0px 0px 0px 4px;
    overflow: auto;
  }
}

.bawf-infoBtn {
  .el-button {
    margin-left: 14px;
  }
}

// 折叠面板
.el-collapse {
  border: none;
  .el-collapse-item__header {
    position: relative;
    height: 42px;
    padding-left: 12px;
    background-color: #f7f7f7;
    border: 1px solid #dcdee2;
    border-radius: 3px;
    font-size: 14px;
  }
  .el-collapse-item__wrap {
    border-bottom: none;
  }
  .el-collapse-item__header::after {
    content: '';
    display: inline-block;
    width: 3px;
    height: 26px;
    position: absolute;
    left: 6px;
    background-color: #1890ff;
  }
  .el-collapse-item__content {
    padding: 12px 0px;
  }
  .el-collapse-item {
    margin-bottom: 5px;
  }
}
// 折叠面板 之定义边框类
.border {
  .el-collapse-item__content {
    padding: 12px;
    border-left: 1px solid #dcdee2;
    border-right: 1px solid #dcdee2;
  }
  .el-collapse-item__wrap {
    border-bottom: 1px solid #dcdee2;
  }
  .el-collapse-item__header.is-active {
    border-radius: 3px 3px 0 0;
  }
}
// baseinfo -table版样式
.validation {
  &::before {
    content: '*';
    display: inline-block;
    margin-right: 3px;
    color: red;
  }
}
// 竖线
.sign {
  margin: 0px 0 4px;
  font-weight: bold;
  font-size: 14px;
  padding-left: 5px;
  width: 25%;
  height: 24px;
  line-height: 24px;
  border-left: 3px solid #1788ff;
  background-image: linear-gradient(
    to right,
    rgba(240, 247, 255, 1),
    rgba(255, 0, 0, 0),
    rgba(255, 0, 0, 0)
  );
  .el-button--mini {
    padding: 5px 10px !important;
  }
}
// 表格右上角统计类文字
.right-count {
  padding-right: 2px;
  margin-bottom: 8px;
  line-height: 16px;
  font-size: 14px;
  display: flex;
  justify-content: flex-end;
}
.view-table {
  table {
    display: table;
    // border: 1px solid #e5eaef;
    border: 1px solid #dde1e6;
    border-radius: 5px;
    width: 100%;
    font-size: 14px;
    table-layout: fixed;
    word-break: break-all;
    border-spacing: 0;
  }
  td {
    line-height: 29px;
    height: 29px;
    text-align: left;
    padding: 0 0 0 0;
    text-overflow: ellipsis;

    & > span {
      padding-left: 15px;
    }
    & > label {
      padding-left: 15px;
    }
    // form-item的上下间隔
    .el-form-item {
      margin-top: 0px;
      margin-bottom: 0px;
    }
    .el-form-item--small .el-form-item__content {
      line-height: 26px;
    }
    .el-input__icon {
      line-height: 22px;
    }
    // 日期中间连字符
    .el-range-editor--small .el-range-separator {
      line-height: 22px;
    }
    // input输入框
    .el-input--small .el-input__inner {
      // height: 26px;
      // line-height: 26px;
      height: 30px;
      line-height: 30px;
    }
    // 日期选择器
    .el-range-editor--small.el-input__inner {
      height: 30px;
    }
    .el-range-editor.el-input__inner {
      padding: 3px 15px;
    }
    // radio单选框--按钮与label间隔
    .el-radio__label {
      padding-left: 5px;
    }
    // radio单选框--label右侧与下一项的间隔
    .el-radio {
      margin-right: 10px;
    }
    // upload上传组件
    .el-upload--picture-card {
      width: 100%;
      height: 100%;
      line-height: 106px;
      border: none;
    }
    // upload上传列表
    .el-upload-list--picture-card .el-upload-list__item {
      width: 100px;
      height: 100px;
    }
    // number-input输入框
    .el-input-number--small {
      line-height: 26px;
    }
    .vue-treeselect__control {
      border: none;
    }

    // 按钮
    .el-button--mini {
      padding: 5px 10px;
    }
    // 验证文字气泡提示
    .el-form-item__error {
      position: absolute;
      top: 20px;
      left: 12px;
      z-index: 10;
      font-size: 12px;
      border-radius: 4px;
      background: #fff;
      border: 1px solid #ff4949;
      // box-shadow: 2px 2px 2px 0px rgba(255, 73, 73, 0.9);
      padding: 3px 8px;
      &::before {
        content: '';
        position: absolute;
        top: -6px;
        left: 50%;
        transform: translateX(-50%);
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-bottom: 6px solid #ff4949;
        width: 0;
        height: 0;
      }
      &::after {
        content: '';
        position: absolute;
        top: -5px;
        left: 50%;
        transform: translateX(-50%);
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-bottom: 6px solid #fff;
        width: 0;
        height: 0;
      }
    }
    // 输入框的边框
    .el-input__inner:hover,
    .el-textarea__inner:hover {
      border: none !important;
    }
    .el-textarea__inner {
      border: none !important;
    }
    .el-input__inner {
      border: none !important;
    }
    .el-select .el-input.is-disabled .el-input__inner {
      border: none !important;
    }
  }
  tr:not(:last-child) td {
    border-bottom: 1px solid #dde1e6;
  }
  td:not(:first-child) {
    border-left: 1px solid #dde1e6;
  }
  .label {
    width: 120px;
    color: #3d4e66;
    // font-weight: 700;
    text-align: right;
    padding-left: 0px;
    padding-right: 5px;
    // background-color: #ebf1f8;
    background-color: #d9ebff;
  }
  .el-input__inner::placeholder {
    color: #8f9db2;
  }
}
.edit-table {
  table {
    display: table;
    width: 100%;
    font-size: 14px;
    table-layout: fixed;
    word-break: break-all;
    border-collapse: collapse;
  }
  td {
    height: 33px;
    line-height: 33px;
    text-align: left;
    padding-left: 10px;
    text-overflow: ellipsis;
    .el-form-item {
      margin-top: 5px;
      margin-bottom: 6px;
    }
  }
  .label {
    width: 100px;
    color: #333333;
    font-weight: 700;
    text-align: right;
    padding-left: 0px;
    padding-right: 5px;
    height: 100%;
    line-height: 33px;
    background-color: #fff;
  }
}

// 全局滚动条
// * {
//   ::-webkit-scrollbar {
//     // width: 10px;
//     height: 10px;
//     background: transparent;
//   }
//   ::-webkit-scrollbar-thumb {
//     background: transparent;
//     border-radius: 4px;
//   }
//   :hover::-webkit-scrollbar-thumb {
//     background: hsla(0, 0%, 53%, 0.4);
//   }
//   :hover::-webkit-scrollbar-track {
//     background: hsla(0, 0%, 53%, 0.1);
//   }
// }

//滚动条的宽度
// ::-webkit-scrollbar {
//   width: 8px;
//   height: 8px;
//   background-color: #e4e4e4;
//   border-radius: 6px;
//   }
//   //滚动条的滑块
//   ::-webkit-scrollbar-thumb {
//   // background-color: #a1a3a9;
//   background-color: hsla(0, 0%, 53%, 0.4);
//   border-radius: 6px;
//   }

/* tree border */
.tree-border {
  margin-top: 5px;
  border: 1px solid #e5e6e7;
  background: #ffffff none;
  border-radius: 4px;
}
// tree scroll
.tree-scroll {
  max-height: calc(100vh - 250px);
  overflow-y: auto;
}
// el-tree的取消选中样式
.el-tree-node:focus > .el-tree-node__content {
  background-color: unset;
}

.el-table .fixed-width .el-button--mini {
  color: #409eff;
  padding-left: 0;
  padding-right: 0;
  width: inherit;
}
.el-table__body .el-table__row td {
  padding: 5px 0px;
}

.el-table--medium th,
.el-table--medium td {
  padding: 5px 0;
}

.el-tabs .el-tabs__content {
  padding: 10px;
}

.el-tree-node__content > .el-checkbox {
  margin-right: 8px;
}

.list-group-striped > .list-group-item {
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  padding-left: 0;
  padding-right: 0;
}

.list-group {
  padding-left: 0px;
  list-style: none;
}

.list-group-item {
  border-bottom: 1px solid #e7eaec;
  border-top: 1px solid #e7eaec;
  margin-bottom: -1px;
  padding: 11px 0px;
  font-size: 13px;
}

.pull-right {
  float: right !important;
}

.el-card__header {
  padding: 14px 15px 7px;
  min-height: 40px;
}

.el-card__body {
  padding: 15px 20px 20px 20px;
}

.card-box {
  padding-right: 15px;
  padding-left: 15px;
  margin-bottom: 10px;
}

/* button color */
.el-button--cyan.is-active,
.el-button--cyan:active {
  background: #20b2aa;
  border-color: #20b2aa;
  color: #ffffff;
}

.el-button--cyan:focus,
.el-button--cyan:hover {
  background: #48d1cc;
  border-color: #48d1cc;
  color: #ffffff;
}

.el-button--cyan {
  background-color: #20b2aa;
  border-color: #20b2aa;
  color: #ffffff;
}

/* image */
.img-circle {
  border-radius: 50%;
}

.img-lg {
  cursor: pointer;
  width: 120px;
  height: 120px;
}

.avatar-upload-preview {
  position: absolute;
  top: 50%;
  transform: translate(50%, -50%);
  width: 180px;
  height: 180px;
  border-radius: 50%;
  box-shadow: 0 0 4px #ccc;
  overflow: hidden;
}

/* 拖拽列样式 */
.sortable-ghost {
  opacity: 0.8;
  color: #fff !important;
  background: #42b983 !important;
}

.top-right-btn {
  position: relative;
  float: right;
}

.el-table-column--selection .cell {
  padding-left: 10px;
  padding-right: 0px;
  overflow: unset;
}

.el-tabs__header {
  margin: 0 0 5px;
}

.el-input__inner,
.el-textarea__inner {
  border: 0.5px solid #c0c4cc !important;
}
.el-input__inner:hover,
.el-textarea__inner:hover {
  border: 0.5px solid #999999;
}
.el-select:hover .el-input__inner {
  border-color: #999999;
}

.el-input-number.is-controls-right .el-input__inner {
  padding-left: 5px;
  padding-right: 30px;
}

.el-select .el-input.is-disabled .el-input__inner {
  border: 0.5px solid #c0c4cc !important;
  color: #888888;
}
.el-select .el-input.is-disabled .el-input__inner:hover {
  border: 0.5px solid #c0c4cc !important;
}

.el-form-item {
  // margin-bottom: 15px;
  margin-bottom: 15px;
}
.el-form-item__error {
  padding-top: 2px;
}

/**查询条件框*/
.searchBar .el-form-item {
  margin-top: 0px;
  margin-bottom: 10px;
  margin-left: 0px;
  margin-right: 10px;
  .el-input .el-input__inner {
    height: 32px;
    line-height: 32px;
  }
}

$placeholderColor: #aaaaaa;

/* WebKit, Blink, Edge */
.el-input__inner::-webkit-input-placeholder,
.el-select::-webkit-input-placeholder {
  color: $placeholderColor;
}
.el-textarea__inner::-webkit-input-placeholder {
  color: $placeholderColor;
}

/* Mozilla Firefox 4 to 18 */
.el-input__inner:-moz-placeholder,
.el-select:-moz-placeholder,
.el-textarea__inner:-moz-placeholder {
  color: $placeholderColor;
}

/* Mozilla Firefox 19+ */
.el-input__inner::-moz-placeholder,
.el-select::-moz-placeholder,
.el-textarea__inner::-moz-placeholder {
  color: $placeholderColor;
}

/* Internet Explorer 10-11 */
.el-input__inner:-ms-input-placeholder,
.el-select:-ms-input-placeholder,
.el-textarea__inner:-ms-input-placeholder {
  color: $placeholderColor;
}

.app-main {
  .el-tabs--border-card {
    /* 114 = navbar +app-container(padding)= 60 + 20 */
    height: calc(100vh - 80px);
    .el-tabs__content {
      overflow: auto;
      /* 155 = navbar +app-container(padding)+ el-tabs--border-card + el-tabs_header= 60 + 20 + 2 + 39*/
      height: calc(100vh - 121px);
      .el-tab-pane {
        height: 100%;
        min-width: 810px;
      }
    }
  }
  .app-wrapper {
    height: calc(100vh - 94px);
    padding: 10px;
    overflow: auto;
  }
}

.hasTagsView {
  .app-main {
    .el-tabs--border-card {
      /* 114 = navbar + tags-view +app-container(padding)= 60 + 34 + 10 */
      height: calc(100vh - 104px);
      .el-tabs__content {
        overflow: auto !important;
        /* 155 = navbar + tags-view +app-container(padding)+ el-tabs--border-card + el-tabs_header= 60 + 34 + 10 + 2 + 39*/
        height: calc(100vh - 145px);
        .el-tab-pane {
          height: 100%;
          min-width: 810px;
        }
      }
    }
    .app-wrapper {
      height: calc(100vh - 94px);
      padding: 10px;
      overflow: auto;
    }
  }
}

/* jsoneditor右上角默认有一个链接,加css去掉了 */
.jsoneditor-poweredBy {
  display: none;
}
/* jsoneditor视图模式选项去掉 */
.jsoneditor-modes {
  display: none;
}
/* jsoneditor高度 */
.jsoneditor-vue {
  height: 100%;
}
/** 打印设置 */
table {
  page-break-inside: auto;
}
tr {
  page-break-inside: avoid;
  break-inside: avoid;
  page-break-after: auto;
}
.lock-screen-back {
  border-radius: 50%;
  z-index: -1;
  //box-shadow: 0 0 0 0 #667aa6 inset;
  box-shadow: 0 0 0 0 #2fa2f5 inset;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: all 3s;
  -webkit-transform: translate(-50%, -50%);
  -moz-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  -o-transform: translate(-50%, -50%);
}

.w-100 {
  width: 100%;
}
.m-r-8 {
  margin-right: 8px;
}

.m-t-16 {
  margin-top: 16px;
}

@mixin margin-bottom($number) {
  -webkit-margin-bottom: $number;
  margin-bottom: $number;
}
.m-b-8 {
  @include margin-bottom(8px);
}
.m-b-8 {
  @include margin-bottom(8px);
}
.m-b-9 {
  @include margin-bottom(9px);
}
.m-b-16 {
  @include margin-bottom(16px);
}
.w-100 {
  width: 100%;
}
.flex-center {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
